package com.zhida.blogservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author ling
 * @since 2024-07-29
 */
@Getter
@Setter
@TableName("blog")
@NoArgsConstructor
@AllArgsConstructor
public class Blog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "blog_id", type = IdType.AUTO)
    private Integer blogId;

    /**
     * 作者
     */
    @TableField("username")
    private String username;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 内容
     */
    @TableField("content")
    private String content;

    /**
     * 发布时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 点赞数
     */
    @TableField("likes")
    private Integer likes;

    /**
     * 收藏数
     */
    @TableField("bookmarks")
    private Integer bookmarks;

    /**
     * 评论数
     */
    @TableField("reviews")
    private Integer reviews;

    /**
     * 资源
     */
    @TableField("resources")
    private String resources;
}
